import request from '@/utils/request'

// 查询维修记录列表
export function listRecords(query) {
  return request({
    url: '/dormitory/dms-repair-records/repairList',
    method: 'get',
    params: query
  })
}

// 查询维修记录详细
export function getRecords(id) {
  return request({
    url: '/dormitory/dms-repair-records/repairInfo' + id,
    method: 'get'
  })
}

// 新增维修记录
export function addRecords(data) {
  return request({
    url: '/system/records',
    method: 'post',
    data: data
  })
}

// 修改维修记录
export function updateRecords(data) {
  return request({
    url: '/system/records',
    method: 'post',
    data: data
  })
}

// 删除维修记录
export function delRecords(data) {
  return request({
    url: '/dormitory/dms-repair-records/delete',
    method: 'post',
    data
  })
}
